<div class="right-inner">
<?php
/**
 * Comment template
 * The main template file for display portfolio page.
 * Author : vthanh_88
 * @package WordPress
*/
if ( post_password_required() ) { ?>
   
	<p><?php echo esc_html__( 'This post is password protected. Enter the password to view comments.', 'TT' ); ?></p>
<?php
	return;
}

if( have_comments() ) : ?> 
					
    					<h2 class="widgettitle"><?php comments_number('No comment', 'Comment', '% Comments'); ?> for <?php the_title(); ?></h2>
            			<div class="comment_wrapper">
            					<?php wp_list_comments( array('callback' => 'tt_comment', 'avatar_size' => '40') ); ?>
                		</div>
    						
    					<!-- End of thread -->  
    					<br class="clear"/>
					
<?php endif; ?>  



<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
			<div class="pagination"><p><?php previous_comments_link(); ?> <?php next_comments_link(); ?></p></div><br class="clear"/><div class="line"></div><br/><br/>
<?php endif; // check for comment navigation ?>



<?php if ('open' == $post->comment_status) : ?> 

		<div class="form-div">
         <div id="sucessmessage" class="form-row"> </div>
		<?php  if(get_theme_option('blog','blog_enable_comment') == "true"): ?>
			<?php   theme_comment_form() ;?>
		
		<div class="clearfix"></div>			
		<?php else:
		echo '<h3>Comment is disabled</h3>';
		endif; ?>
		</div>
			
<?php endif; ?> 
</div>